
fn = './emaf_paper/training_sets.dat'
n = FILE_LINES(fn)

openr,lun,fn,/GET_LUN

training = replicate( create_struct( 'Name','','cnum',0L,'l',0.,'b',0.,$
                                     'vlsr',0.,'d',0.d,'dm',0.,'dp',0.),n)

FOR i=0L, n-1 DO BEGIN
   line = ''
   readf,lun,line
   
   training[i].name = strtrim(strmid(line,0,12),2)
   training[i].cnum = long(strmid(line,13,4))
   training[i].l    = float(strmid(line,19,7))
   training[i].b    = float(strmid(line,27,8))
   training[i].vlsr = float(strmid(line,36,6))
   training[i].d    = float(strmid(line,43,5))
   training[i].dm   = float(strmid(line,49,4))
   training[i].dp   = float(strmid(line,55,4))

   print,training[i]
   
ENDFOR

save,training,filename='./emaf_paper/training_set.sav',/ver

END
